package edu.hm.dako.EchoApplication.Lwtrt;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/*
 * Logging
 */
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.PropertyConfigurator;

/* 
 * LWTRT Layer
 */
import edu.hm.dako.EchoApplication.Basics.EchoPDU;
import edu.hm.dako.lwtrt.LWTRTAbortException;
import edu.hm.dako.lwtrt.LWTRTConnection;
import edu.hm.dako.lwtrt.impl.LWTRTServiceImpl;
import edu.hm.dako.lwtrt.LWTRTException;
import edu.hm.dako.lwtrt.LWTRTAbortException;

/**
 * Klasse LWTRTMultiThreadedEchoServer
 *  
 * @author Mandl
 *
 */
public class LWTRTMultiThreadedEchoServer extends Thread
{	 
		private static Log log = LogFactory.getLog(LWTRTMultiThreadedEchoServer.class);

		private static int serverPort = 50000;
		
		private static int numberOfWorkerThread = 0;
		
		// Verbindungstabelle: Hier werden alle aktiven Verbindungen zu Clients verwaltet
	    private static Map<String, LWTRTConnection> connections = new ConcurrentHashMap<String, LWTRTConnection>();
	    
		// Transportverbindung zu einem Client
		private LWTRTConnection con;
				
	    /**
	     * Konstruktor
	     */
		public LWTRTMultiThreadedEchoServer(LWTRTConnection incoming)
		{		
			 this.con = incoming;
		}
		
   	    public static void main (String args[])
   	    {
   	    	PropertyConfigurator.configureAndWatch("log4j.server.properties", 60 * 1000);
   	    
   	    	//TODO
   	    	
   	    }
   	    
   	    /**
   	     * Worker-Thread-Methode fuer die Bearbeitung eines Clients
   	     */
   	    public void run()
   	    {	
   	    	//TODO
   	    	
	 	} // run 	    
 }